<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style type="text/css">
    body {
      padding: 0;
      margin: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
      font-family: sans-serif;
      background: #06031d;
    }

    a {
      position: relative;
      font-size: 24px;
      /*
        text-transform:转换不同元素中的文本
          uppercase：全部大写
          lowercase：全部小写
          capitalize：首字母大写
      */
      text-transform: uppercase;
      letter-spacing: 1px;
      text-decoration: none;
      color: #fff;
      box-shadow: 0 0 40px rgba(0, 0, 0, .5);
      overflow: hidden;
      padding: 10px 20px;
    }

    a span {
      position: absolute;
      display: block;
      background: #03a9f4;

    }

    a span:nth-child(1) {
      top: 0;
      left: 0;
      width: 2px;
      height: 100%;
      transform: translateY(0);
    }

    a:hover span:nth-child(1) {
      transition: .5s;
      transform: translateY(-100%);
    }

    a span:nth-child(4) {
      top: 0;
      right: 0;
      width: 2px;
      height: 100%;
      transform: translateY(0);
    }

    a:hover span:nth-child(4) {
      transition: .5s;
      transform: translateY(100%);
    }

    a span:nth-child(2) {
      top: 0;
      left: 0;
      width: 100%;
      height: 2px;
      transform: translateX(-100%);
    }

    a:hover span:nth-child(2) {
      transition: .75s;
      transform: translateX(100%);
      transition-delay: .25s;
    }

    a span:nth-child(5) {
      bottom: 0;
      left: 0;
      width: 100%;
      height: 2px;
      transform: translateX(100%);
    }

    a:hover span:nth-child(5) {
      transition: .75s;
      transform: translateX(-100%);
      transition-delay: .25s;
    }

    a span:nth-child(3) {
      top: 0;
      right: 0;
      width: 2px;
      height: 100%;
      transform: translateY(-100%);
    }

    a:hover span:nth-child(3) {
      transition: .5s;
      transition-delay: .5s;
      transform: translateY(0);
    }

    a span:nth-child(6) {
      top: 0;
      left: 0;
      width: 2px;
      height: 100%;
      transform: translateY(100%);
    }

    a:hover span:nth-child(6) {
      transition: .5s;
      transition-delay: .5s;
      transform: translateY(0);
    }
  </style>
</head>
<body>
<a href="">
  button
  <span></span>
  <span></span>
  <span></span>
  <span></span>
  <span></span>
  <span></span>
</a>
</body>
</html>